//
//  main.c
//  characters
//
//  Created by edz on 2020/6/24.
//  Copyright © 2020 edz. All rights reserved.
//

#include <stdio.h>

int main(int argc, const char * argv[]) {
    int letter = 0,digit=0,other=0,i;
    char ch;
    printf("请输入十个字符：");
    for (i = 0; i < 10; i++) {
        scanf("%c",&ch);
        // printf("%c\n",ch);
        if ((ch >= 'a' && ch <= 'z') ||  (ch >= 'A' && ch <= 'Z')) {
            letter++;
        }
        else if (ch >= '0' && ch <= '9'){
            digit++;
        }
        else
            other++;
    }
    printf("有%d个字母\n",letter);
    printf("有%d个数字\n",digit);
    printf("有%d个其他符号\n",other);
    return 0;
}
